<?php

use backend\util\template\Template;

/* @var $this yii\web\View */

$this->title = "首页";
?>
<div class="site-index">

    <div class="jumbotron">
        <h1>绣学问管理平台</h1>

<!--        <p class="lead">You have successfully created your Yii-powered application.</p>-->

<!--        <p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p>-->
    </div>

    <div class="body-content">

        <div class="row text-center">

            <div class="col-lg-1"></div>
            <div class="col-lg-1"></div>

            <div class="col-lg-1 white">
                <h4><?= $amount; ?>元</h4>
                <p>今日交易额</p>
            </div>

            <div class="col-lg-1"></div>

            <div class="col-lg-1 white">
                <h4><?= $count ?></h4>
                <p>今日订单数</p>
            </div>

            <div class="col-lg-1"></div>

            <div class="col-lg-1 white">
                <h4><?= $nPay ?></h4>
                <p>待付款订单</p>
            </div>

            <div class="col-lg-1"></div>

            <div class="col-lg-1 white">
                <h4><?= $stayDeliver ?></h4>
                <p>待发货订单</p>
            </div>

            <div class="col-lg-1"></div>
            <div class="col-lg-1"></div>
            <div class="col-lg-1"></div>

        </div>

        <div class="space"></div>

        <div class="row">
            <div class="col-lg-2"></div>
            <div class="col-lg-8">
                <table class="table-bordered message-box">
                    <tr>
                        <td>
                            <h4>消息通知</h4>
                        </td>
                    </tr>
                    <?php foreach ($feedbacks as $feeback): ?>
                    <tr>
                        <td>
                           <?= Template::statusValue($feeback->status);?>
                        </td>
                        <td>
                            <?= $feeback->desc;?>
                        </td>
                        <td>
                            <?= Template::timeBefore($feeback->create_time); ?>
                        </td>
                    </tr>
                    <?php endforeach;?>

                </table>
            </div>
            <div class="col-lg-2"></div>
        </div>
    </div>
</div>
<?php
$CSS = <<< css
.white{
    background-color: #ffffff;
}
.space{
    height: 70px;
}
.message-box{
    width: 100%;
    height: 100%;
}
    
css;
$this->registerCss($CSS);
?>
